determine the intervals that a graph is increasing and decreasing